// 默认配置数据
export const defaultTplConf = {
	id: undefined,
	biz_id: 0,
	bra_id: "",
	name: "",
	title: "页面标题",
	backgroundColor: "#f7f8f9",
	navigatorTitleColor: "#333",
	navigatorColor: "#fff",
	enable_service: 0,
	copy_type: 2,
	enable_location_wechat: 1,
	code_ids: [],
	enable_mes: 0,
	enable_form: 0,
	city_data: "",
	is_payment: 0,
	pay_money: "",
	original_cost: "",
	discount_money: "",
	form_type: 0,
	mul_city: 0,
	form_pay: 0,
	modal_show: 0,
	modal_tpl: "",
	second_copy: 0,
	wechat_tip_show: 0,
	wechat_tip_tpl: "",
	content: "",
	content2: "",
	wechat_dialog_desc: "",
	// 自动跳转小程序
	auto_skip_mp: 0,
	mp_query: ""
};

export const commonFormFields = [
	{
		label: "姓名",
		key: "name",
		type: "input"
	},
	{
		label: "手机号",
		key: "mobile",
		type: "input",
		required: true,
		rules: [{ pattern: /^[1][3-9][0-9]{9}$/, message: "手机号格式不正确" }]
	}
];
export const commonFormOptions = {
	fixed: true,
	city_data: [],
	is_payment: 1,
	form_pay: 1,
	original_cost: "",
	pay_money: "",
	pay_result_land: ""
};
export const tplData = [
	{
		type: "dynamic-qrcode",
		name: "动态二维码",
		icon: "el-icon-full-screen",
		options: {
			size: 125,
			top: 125,
			left: 125,
			bg_img_name: "",
			bg_img: "",
			bg_height: 375
		}
	},
	{
		type: "wechat",
		name: "微信关注",
		icon: "el-icon-chat-dot-round",
		options: {
			img: "",
			padding_lr: 0,
			padding_tb: 10,
			is_fixed: 2,
			click_type: 1,
			// 跳转小程序
			skip_mp_id: [],
			// 跳转小程序页面参数
			mp_query: "",
			is_dialog: 2
		}
	},

	{
		type: "image",
		name: "图片",
		icon: "el-icon-picture-outline",
		options: {
			images: [],
			click_type: 2,
			is_dialog: 2,
			mp_query: "",
			dialog_content: "打开微信添加客服"
		}
	},
	{
		type: "article",
		name: "文章",
		icon: "el-icon-tickets",
		options: {
			padding_lr: 10,
			padding_tb: 10,
			content: ""
		}
	},

	{
		type: "wechat-contact",
		name: "微信客服(悬浮)",
		icon: "el-icon-chat-dot-round",
		options: {
			contactType: 3,
			corpId: "",
			link: "",
			img: "",
			skip_mp_id: [],
			mp_query: "",
			width: 50,
			height: 50,
			x: 10,
			y: 200,
			is_dialog: 2
		}
	},
	{
		type: "qa-swipe",
		name: "轮播问答",
		icon: "el-icon-document",
		options: {
			formList: [], //表单列表
			bg_img: "", //背景图片
			mp_query: ""
		}
	},
	{
		type: "btnMessage",
		name: "对话问答",
		icon: "el-icon-chat-dot-round",
		options: {
			content: "亲亲你是否纹过眉毛",
			leftBtnText: "有纹过",
			rightBtnText: "没有",
			teacherName: "",
			formList: [
				{
					question: "您是喜欢什么样的眉形呢",
					newOption: "",
					options: ["远峰眉", "小欧眉"]
				}
			],
			width: 50,
			height: 100,
			x: 10,
			y: 200
		}
	},
	{
		type: "image-long-touch",
		name: "图片长按",
		icon: "el-icon-picture-outline",
		options: {
			imageUrl: '',
			jobTitle:'',
			name:'',
			companyName:'',
      jobTitleColor:'',
      nameColor:'',
      companyNameColor:''
		}
	},
	{
		type: "CustomerServiceThree",
		name: "聊天问答",
		icon: "el-icon-chat-dot-round",
		// bra_id: [297, 1423, 1907, 438], //指定品牌
		options: {
			teacherName: "全国连锁",
			title: "",
			imgLogo: "", //客服头像
			duration: 3, //定时时间
			is_go: 0, //是否自动跳转
			img: "",
			// textColor: "#98222e", //消息文字颜色
			// btnColor: "#0550d6", //按钮颜色
			// myColor:"",//我的消息颜色
			customer_loading_time: 1, //客服加载时间
			formList: [
				{
					question: "您所在的城市在哪里？",
					newOption: "",
					options: ["北京", "上海", "广州", "深圳"],
					is_go_five: 1, //是否自动跳转
					is_over_return: "", //是否停止跳转
					over_return_list: [], //停止跳转条件
					over_return_text: "抱歉你所在的城市暂无门店！" //停止跳转文案
				},
			],
			width: 50,
			height: 50,
			x: 10,
			y: 200,
			kaitou:"亲，您好~您也是咨询XX吗?咱们是全国连锁，您附近就有门店哦~",
			jieshu:"好的亲!正在为您分配专属设计师，我们会给您发送附近门店地址，您可自由安排进店时间，无需排队~",
			is_open:0
		}
	},
];

export const tplDataMap = tplData.reduce((prev, curr) => {
	return {
		...prev,
		[curr.type]: curr
	};
}, {});
